package com.santu.edu.supporter.biz.user.pojo.po;

import com.santu.edu.supporter.biz.user.pojo.dto.UserDTO;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @TableName day_day_up_user
 */
@Data
@Accessors(chain = true)
public class UserPO implements Serializable {
    /**
     *
     */
    private Long id;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 推广码
     */
    private String invitationCode;

    /**
     *
     */
    private String gmtCreate;

    /**
     *
     */
    private String gmtModified;

    private static final long serialVersionUID = 1L;


    public static UserPO createItem(UserDTO dto) {
        return new UserPO()
                .setUserId(dto.getUserId())
                .setUserName(dto.getUserName())
                .setPhone(dto.getPhone())
                .setAvatar(dto.getAvatar())
                .setInvitationCode(dto.getInvitationCode());
    }
}